package sch.frog.creational.abstractfactory;

import sch.frog.creational.abstractfactory.abean.IMBean;
import sch.frog.creational.abstractfactory.bbean.INBean;
import sch.frog.creational.abstractfactory.factory.AFactory;
import sch.frog.creational.abstractfactory.factory.IFactory;

public class AbstractFactoryDemo {

    public static void main(String[] args){
        IFactory factory = new AFactory();

        IMBean mBean = factory.createMBean();
        INBean nBean = factory.createNBean();

        mBean.show();
        System.out.println(nBean.fetchName());
    }
}
